﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_IPORT.Master" CodeBehind="SetProduct_Shore.aspx.vb" Inherits="I_PORT.SetProduct_Shore" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" language="javascript">
        function closeModal(type) {
           // document.getElementById('ctl00_contentplaceholder1_framePopup').src = 'about:blank';
            if (type == '@')
            {
            var mpu = $find('ctl00_ContentPlaceHolder1_ModalPopupExtender5');
            mpu.hide();
            document.getElementById('ctl00_contentplaceholder1_btnReLoad').click();
            }
           
        }
</script>
    <asp:UpdatePanel ID="UpdatePanelMaster" runat="server">
   <ContentTemplate>
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
     <td>
        <asp:Panel ID="PanelBookingItem" runat="server">
          <table width="100%" border="0" cellpadding="2" cellspacing="0">
          <tr>
                 <td style="height:5px;"><img src="../Image/space.gif" /></td>
              </tr>
              <tr>
                <td colspan="2" align="center">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                   <tr>
                       <td valign="top">
                          <table width="100%" border="0" cellpadding="2" cellspacing="0">
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label62" runat="server" SkinID="lbtxt" Text="Booking No. :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtBookingVPS" runat="server" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label72" runat="server" SkinID="lbtxt" Text="Product :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtProductSearch" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label67" runat="server" SkinID="lbtxt" Text="Product L/D :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlProductLD" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="L">Load</asp:ListItem>
                                       <asp:ListItem Value="D">Disch</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label68" runat="server" SkinID="lbtxt" Text="Destination :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDestinationSearch" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">All</asp:ListItem>
                                       <asp:ListItem Value="I">Domestic</asp:ListItem>
                                       <asp:ListItem Value="O">Foreign</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                             <tr>
                                <td align="right" style="width:100px;">&nbsp;</td>
                                <td align="left">
                                    <asp:Button ID="btnSearchVPS" runat="server" Text="ค้นหา" CssClass="ButtonStyle" />
                                </td>
                             </tr>
                          </table>
                       </td>
                       <td valign="top">
                       <table width="100%" border="0" cellpadding="2" cellspacing="0">
                              <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label63" runat="server" SkinID="lbtxt" Text="Ship's Name :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:TextBox ID="txtShipVPS" runat="server" Width="80%" ></asp:TextBox>
                                </td>
                             </tr>
                             <tr>
                          <td style="width:100px;" align="right"><asp:Label ID="label69" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label70" runat="server" SkinID="lbtxt" Text="Lay Can :"></asp:Label>&nbsp;</td>
                         <td align="left"><asp:TextBox ID="txtDateSearch" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateSearch" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:Label ID="Label71" runat="server" SkinID="lbtxt" Text="TO"></asp:Label>&nbsp;<asp:TextBox ID="txtDateToSearch" runat="server" Width="80px"  onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateToSearch" runat="server"  ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtenderSearch5" runat="server" TargetControlID="txtDateSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateSearch"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSearch6" runat="server" TargetControlID="txtDateToSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateToSearch" ></asp:CalendarExtender>
                              </td>
                           </tr>
                             <tr>
                                <td align="right" style="width:100px;"><asp:Label ID="label64" runat="server" SkinID="lbtxt" Text="Status :" ></asp:Label>&nbsp;</td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlStatusVPS" runat="server" SkinID="ddl" >
                                       <asp:ListItem Value="A">On Processing</asp:ListItem>
                                       <asp:ListItem Value="W">Waiting For Set Shore</asp:ListItem>
                                       <asp:ListItem Value="S">Set Shore Complete</asp:ListItem>
                                       <asp:ListItem Value="C">Cancel</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                             </tr>
                          </table>
                       </td>
                   </tr>
                </table>
                </td>
              </tr>
              <tr>
                 <td colspan="2" align="right">
                     <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                        <tr>
                          <td>&nbsp</td>
                          <td style="width:24px;"><img src="../Image/red.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label34" runat="server" SkinID="lbtxt" Text="WAITING VERIFIED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/green.png" /></td>
                          <td style="width:60px;" align="left">&nbsp<asp:Label ID="Label35" runat="server" SkinID="lbtxt" Text="RELEASED"></asp:Label></td>
                          <td style="width:24px;"><img src="../Image/comment.png" /></td>
                          <td style="width:90px;" align="left">&nbsp<asp:Label ID="Label44" runat="server" SkinID="lbtxt" Text="COMMENT"></asp:Label></td>
                          <td style="background-color:#A0CFEC;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="lb" runat="server" SkinID="lbtxt" Text="LOAD TO DOMESTIC"></asp:Label></td>
                          <td style="background-color:#6698FF;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label30" runat="server" SkinID="lbtxt" Text="LOAD TO FOREIGN"></asp:Label></td>
                          <td style="background-color:#52D017;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label31" runat="server" SkinID="lbtxt" Text="DISCH FROM DOMESTIC"></asp:Label></td>
                          <td style="background-color:#347C17;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label32" runat="server" SkinID="lbtxt" Text="DISCH FROM FOREIGN"></asp:Label></td>
                          <td style="background-color:#FF0000;width:24px;">&nbsp;</td>
                          <td style="width:140px;" align="left">&nbsp<asp:Label ID="Label33" runat="server" SkinID="lbtxt" Text="CANCEL BOOKING"></asp:Label></td>
                        </tr>
                    </table>
                 </td>
              </tr>
              <tr>
                 <td style="height:5px;"><img src="../Image/space.gif" /></td>
              </tr>
              <tr>
                 <td colspan="2" align="center">
                 <asp:Panel ID="panelGridItem" runat="server" Width="900px" ScrollBars="Horizontal">
                  <asp:GridView ID="gridItem" runat="server" SkinID="gridblue" DataKeyNames="Status,Booking_Code,Booking_name,Vehicle_no,Vehicle_Text,Booking_no,Date_From,Date_To,MAgent_no,MAgent_name,SAgent_no,SAgent_name,MKT_Product,MKT_Custom,MKT_Finance,Booking_Date,Booking_Time,VPS_approve,MRI_approve,Marketing_approve,Vps_Acknowledge,MKT_Acknowledge,Remark_VPS,Remark_MRI,Vehicle_Destination,Vehicle_TypeBuy,Demurrage,Demurrage_Money,BunkerFO_Point,BunkerDO_Point,PORT,Confirm_Time,File_Upload,SELLER,BUYER,Product_Unit"
                                                AutoGenerateColumns="False">
                                                <PagerTemplate>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:ImageButton ID="ImgFirst" runat="server" Height="22px" ImageUrl="../Image/arrow-first.gif"
                                                                    OnCommand="Paginate" CommandArgument="First" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                                    OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                            </td>
                                                            <td valign="top">
                                                                Page
                                                                <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                                of
                                                                <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                                    OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                            </td>
                                                            <td>
                                                                <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                                    OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </PagerTemplate>
                                                <Columns>
                                                    <asp:TemplateField HeaderText="BOOKING NO." ItemStyle-Wrap="false">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="LinkBooking" runat="server" Text="<%# Bind('Booking_no') %>"
                                                                CommandArgument="<%# Container.DataItemIndex %>" CommandName="Edit"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="Status" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="LAY CAN/LAY DAY" DataField="Date_To" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="วันเวลา/จองเข้า" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="LAY TIME" DataField="Lay_Time" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="Vessel NAME" DataField="Vehicle_Text" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="เอกสารรายละเอียด" DataField="File_Upload" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="COMMODITY" DataField="Product_Name" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="QUANTITY" DataField="Product_Amount" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="UNIT" DataField="Product_Unit" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="BUYER" DataField="BUYER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="SALLER" DataField="SELLER" ItemStyle-Wrap="false" />
                                                    <asp:BoundField HeaderText="Status" DataField="Status_Text" Visible="false" />
                                                    <asp:TemplateField HeaderText="Product" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgProduct" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Custom" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgCustom" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Finace" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgFinance" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="DEMURRAGE" DataField="Lay_Time" />
                                                    <asp:BoundField HeaderText="TERM" DataField="Lay_Time" />
                                                    <asp:TemplateField HeaderText="VPS" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgVPS" runat="server" /><asp:Image ID="imgVPSComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MRI" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMRI" runat="server" /><asp:Image ID="imgMRIComment" runat="server"
                                                                ImageUrl="~/Image/comment.png" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="MKT" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgMKT" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="AGENT" DataField="MAgent_name" />
                                                    <asp:BoundField HeaderText="เทียบท่า" DataField="Wharf" />
                                                    <asp:BoundField HeaderText="วันเทียบ" DataField="Date_Wharf" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeStart" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="Date_WharfEnd" />
                                                    <asp:BoundField HeaderText="เวลาเทียบ" DataField="TimeEnd" />
                                                    <asp:TemplateField HeaderText="Confirm" ItemStyle-Width="40px">
                                                        <ItemTemplate>
                                                            <asp:Image ID="imgConfrim" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="REMAIN LAYTIME" />
                                                    <asp:BoundField HeaderText="REMARK" DataField="RemarkWharf" />
                                                    <asp:TemplateField HeaderText="" ItemStyle-Width="105px">
                                                        <ItemTemplate>
                                                            <asp:Button ID="btnDetail" runat="server" Text="Detail" CssClass="ButtonStyle" CommandArgument="<%# Container.DataItemIndex %>" CommandName="Detail"  />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <asp:Timer ID="Timer1" Interval="300000" runat="server">
                                            </asp:Timer>
                 </asp:Panel>
                     <asp:Label ID="lbAlert" runat="server" Text="" Font-Names="Tahoma" style="color:Red; font-size:16px;"></asp:Label>
                 </td>
              </tr>
          </table>
        </asp:Panel>
        <asp:Panel ID="PanelShoreProduct" runat="server" Visible="false">
           <table width="100%" border="0" cellpadding="2" cellspacing="0">
              <tr>
                 <td style="height:5px;"><img src="../Image/space.gif" /></td>
              </tr>
                <tr>
          <td align="center">
             <asp:UpdatePanel ID="UpdatePanelTug" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
              <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                <tr>
                   <td>
                     <table width="100%" border="0" cellpadding="2" cellspacing="0">
                           <tr>
             <td style="width:140px;" align="right"><asp:Label ID="lbVessel" runat="server" SkinID="lbtxt" Text="เรือ :"></asp:Label>&nbsp;</td>
             <td align="left"><asp:Label ID="lbVehicle" runat="server" SkinID="lbtxt" ></asp:Label></td>
            </tr>
             <tr>
             <td style="width:140px;" align="right">&nbsp;</td>
             <td align="left">
             <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                       <tr>
                                          <td style="width:60px;" align="right"><asp:Label ID="Label13" runat="server" SkinID="lbtxt" Text="LOA :"></asp:Label></td>
                                          <td style="width:150px;" align="left"><asp:Label ID="lbLOA" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;<asp:Label ID="Label19" runat="server" SkinID="lbtxt" Text="FT"></asp:Label></td>
                                          <td style="width:90px;" align="right"><asp:Label ID="Label14" runat="server" SkinID="lbtxt" Text="DWT :"></asp:Label></td>
                                          <td style="width:150px;" align="left"><asp:Label ID="lbDWT" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;<asp:Label ID="Label10" runat="server" SkinID="lbtxt" Text="FT"></asp:Label></td>
                                          <td>&nbsp;</td>
                                       </tr>
                                       <tr>
                                          <td style="width:60px;" align="right"><asp:Label ID="Label15" runat="server" SkinID="lbtxt" Text="Draft :"></asp:Label></td>
                                          <td style="width:150px;" align="left"><asp:Label ID="lbDraft" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;<asp:Label ID="Label11" runat="server" SkinID="lbtxt" Text="FT"></asp:Label></td>
                                          <td style="width:90px;" align="right"><asp:Label ID="Label16" runat="server" SkinID="lbtxt" Text="GRT :"></asp:Label></td>
                                          <td style="width:150px;" align="left"><asp:Label ID="lbGRT" runat="server" SkinID="lbtxt"></asp:Label>&nbsp;<asp:Label ID="Label12" runat="server" SkinID="lbtxt" Text="FT"></asp:Label></td>
                                          <td>&nbsp;</td>
                                       </tr>
                                       <tr>
                                          <td style="width:60px;" align="right"><asp:Label ID="Label27" runat="server" SkinID="lbtxt" Text="Nationality :"></asp:Label></td>
                                          <td style="width:150px;" align="left"><asp:Label ID="lbNation" runat="server" SkinID="lbtxt"></asp:Label></td>
                                          <td colspan="3">&nbsp;</td>
                                       </tr>
                      </table>
               </td>
               </tr>
               <tr>
               <td style="width:140px;" align="right"><asp:Label ID="lbDateText" runat="server" SkinID="lbtxt" Text="Lay Can/Lay Day :"></asp:Label>&nbsp;</td>
               <td align="left"><asp:Label ID="lbDate" runat="server" SkinID="lbtxt" ></asp:Label></td>
            </tr>
            <tr>
               <td style="width:140px;" align="right"><asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text="วัน\เวลาจองเข้า :"></asp:Label>&nbsp;</td>
               <td align="left"><asp:Label ID="lbBookingDateTime" runat="server" SkinID="lbtxt" ></asp:Label></td>
            </tr>
            <tr>
               <td style="width:140px;" align="right"><asp:Label ID="Label22" runat="server" SkinID="lbtxt" Text="Lay Time :"></asp:Label>&nbsp;</td>
               <td align="left"><asp:Label ID="lbLayTime" runat="server" SkinID="lbtxt" ></asp:Label></td>
            </tr>
            <tr>
               <td style="width:140px;" align="right"><asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text="Wharf :"></asp:Label>&nbsp;</td>
               <td align="left"><asp:Label ID="lbWharf" runat="server" SkinID="lbtxt" ></asp:Label></td>
            </tr>
                     </table>
                   </td>
                </tr>
                <tr>
                   <td>
                   <asp:GridView ID="gridProduct" runat="server" SkinID="gridblueNoPage" DataKeyNames="Product_no,Group_no,Product_Index,Product_name,Product_Event,Product_Shore,Product_Line,Product_Facility,Product_Buyer_name,Product_Seller_name,LoadDestination,DischDestination,Product_Amount"
                     AutoGenerateColumns="False">
                     <Columns>
                         <asp:BoundField HeaderText="Operation" DataField="Product_Event" />
                         <asp:BoundField HeaderText="กลุ่มสินค้า" DataField="Group_name" />
                         <asp:BoundField HeaderText="สินค้า" DataField="Product_name"/>
                         <asp:BoundField HeaderText="จำนวน" DataField="Product_Amount" 
                             ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" >
                             <ItemStyle HorizontalAlign="Center" Width="80px" />
                         </asp:BoundField>
                         <asp:BoundField HeaderText="หน่วย" DataField="Product_Unit" />
                         <asp:BoundField HeaderText="Destination" DataField="DestinationShow" />
                         <asp:BoundField HeaderText="รายละเอียด" DataField="Product_Description"/>
                         <asp:TemplateField HeaderText="ลำดับ">
                             <ItemTemplate>
                                 <asp:DropDownList ID="ddlIndex" SkinID="ddl" AutoPostBack="true" runat="server" >
                                         <asp:ListItem Value="0"><--กรุณาเลือก--></asp:ListItem>
                                 </asp:DropDownList>
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="Shore">
                             <ItemTemplate>
                                 <asp:DropDownList ID="ddlShore" CommandArgument="<%# Container.DataItemIndex %>" SkinID="ddl" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlShore_SelectedIndexChanged" >
                                    <asp:ListItem>test</asp:ListItem>
                                    <asp:ListItem>test2</asp:ListItem>
                                 </asp:DropDownList>
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="Line">
                            <ItemTemplate>
                                 <asp:DropDownList ID="ddlLine" CommandArgument="<%# Container.DataItemIndex %>" AutoPostBack="true" SkinID="ddl" runat="server" OnSelectedIndexChanged="ddlLine_SelectedIndexChanged" >
                                    <asp:ListItem Value="0"><--กรุณาทำการเลือก Shore--></asp:ListItem>
                                 </asp:DropDownList>
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="Facility">
                             <ItemTemplate>
                                 <asp:DropDownList ID="ddlFacility" CommandArgument="<%# Container.DataItemIndex %>" SkinID="ddl" runat="server" >
                                    <asp:ListItem Value="0"><--กรุณาทำการเลือก Line--></asp:ListItem>
                                 </asp:DropDownList>
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                    </asp:GridView>
                   </td>
                </tr>
             </table>
                </ContentTemplate>
             </asp:UpdatePanel>
          </td>
        </tr>
          <tr>
             <td>
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                  <td style="width:140px;" align="right">&nbsp;</td>
                   <td align="left">
                       <asp:Button ID="btnSave" runat="server" Text="บันทึก" CssClass="ButtonStyle" />
                       <asp:Button ID="btnBack" runat="server" Text="กลับ" CssClass="ButtonStyle" />
                    </td>
                </tr>
                </table>
             </td>
          </tr>
           </table>
        </asp:Panel>
      </td>
    </tr>
  </table>
              <asp:Button ID="btnPopupDetail" runat="server" Text="Button" style="display:none;" />
             <asp:Button ID="btnReLoad" runat="server" Text="Button" style="display:none;" />
              <asp:ModalPopupExtender ID="ModalPopupExtender5" runat="server" BackgroundCssClass="Background"
                TargetControlID="btnPopupDetail" PopupControlID="PanelDetailPopup">
            </asp:ModalPopupExtender>
               <asp:Panel ID="PanelDetailPopup" runat="server" Style="display: none;">
                <table>
                    <tr>
                        <td>
                            <iframe runat="server" id="IframeDetailPopup" marginheight="0px" class="Style-Iframe" marginwidth="0px"></iframe>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
 </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
